package string;

public class homework {
    public static void main(String[] args) {
        String a="abc             ";
        a=a.trim();
        System.out.println(a);
        a=a.toUpperCase();
        System.out.println(a);
        a=a.toLowerCase();
        System.out.println(a);
        boolean b=a.startsWith("a");
        System.out.println(b);
        boolean c=a.endsWith("b");
        System.out.println(c);
        char d=a.charAt(2);
        System.out.println(d);
        int index=a.lastIndexOf("a");
        System.out.println(index);
        index=a.indexOf("b");
        System.out.println(index);
        String danei="www.tedu.com.cn";
        int start=danei.indexOf(".")+1;
        int end=danei.indexOf(".",start);
        String name=danei.substring(start,end);
        System.out.println(name);
        String q="123";
        int h=666;
        String q1=String.valueOf(q);
        String h1=String.valueOf(h);
        System.out.println(q1);
        System.out.println(h1);

    }
}
